let connection;
var oracledb = require('oracledb');
 
(async function() {
try{
   connection = await oracledb.getConnection({
        user : 'zjhis',
        password : 'ZJHIS',
        connectString : `(DESCRIPTION =
            (ADDRESS_LIST =
              (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.1)(PORT = 1521))
            )
            (CONNECT_DATA =
              (SID = ORCL)
            )
          )`
   });
   console.log("Successfully connected to Oracle!")
} catch(err) {
    console.log("Error: ", err);
  } finally {
    if (connection) {
      try {
        await connection.close();
      } catch(err) {
        console.log("Error when closing the database connection: ", err);
      }
    }
  }
})()